package org.example;

import java.util.Scanner;

public class MaoPaoScanner {
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        System.out.println(scanner.nextInt());
        int[] arr = new int[7];
        for(int i = 0;i<arr.length;i++){
            arr[i] = scanner.nextInt();
        }

        int temp = 0;
        for(int m=0;m<arr.length-1;m++){
            for(int n=0;n<arr.length-m-1;n++){
                if(arr[n]<arr[n+1]){
                    temp = arr[n+1];
                    arr[n+1] = arr[n];
                    arr[n] = temp;
                }
            }
        }

        for(int re=0;re<arr.length-1;re++){
            if(re!=arr.length-1){
                System.out.print(arr[re] + ",");
            }else {
                System.out.print(arr[re]);
            }

        }
    }
}
